<?php

class SiteController extends BaseController {
	//public $layout = 'layouts.default';
	
	public function __construct(){
		$data = Session::all();
		$data['is_login'] = 0;
		$login = $data['is_login'];
		if ($login<>1) {
			return Redirect::to('http://localhost/laravel/public/login');
		}
	}
	
    public function haloJuga()
    {
		//$data = TblObu::find(1);
		$data = DB::table('tbl_obu')->get();
		//return View::make('halo_juga',$data);
		//Session::flush();
		/*
		$newPost = new User;
		$newPost->i_type = '1';
		$newPost->v_login = 'Fitrah';
		$newPost->email = 'fitrah';
		$newPost->v_status = 'Active';
		$newPost->password = Hash::make('123456');
		$newPost->save();
		*/
		//var_dump(Auth::check());
		//var_dump(Auth::guest());
		//var_dump(Auth::user());
		//Auth::logout();
		$data = Helpers::doMessage(); 
		return View::make('halo_juga')->with('data', $data);
    }

    

}

?>